
from PIL import Image


if False:
    # 灰度图
    l = l.astype(np.float64)
    for ii, band in enumerate(l):
        l[ii] = adjust_band(band)
    nl = (l * 255).astype(np.uint8)
    # l = map(normalize, l)
    # nl = (np.array(list(l)) * 255).astype(np.uint8)
    img = Image.fromarray(nl).convert('L')
    img.save(args.src + '.png')

if False:
    # RGB
    b, g, r = map(normalize, (b, g, r))
    nrgb = (np.dstack((r, g, b)) * 255).astype(np.uint8)
    img = Image.fromarray(nrgb).convert('RGB')
    img.save(args.src + '.png')
